/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/container
// Copyright (c) 2014.  All Rights Reserved
//
// File:		AETStringWChar.h
// Author:		Gianluca Belardelli
// Date:		17/12/2013
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AETSTRINGWCHAR_H_
#define _AETSTRINGWCHAR_H_

template<>
class AETString<wchar_t>
{
// Members
protected:
	char		*m_lpString;
	AEUINT32	m_uiCapacity;
	AEUINT32	m_uiLen;

// Methods
public:
	AE_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( TOBEDEFINED, AETString<wchar_t> );

	///////////////////////////////////////////////////////////////
	/// @name Costruttori e distruttore
	/// @{
	///////////////////////////////////////////////////////////////
	AE_FORCEINLINE AETString( void );
	AE_FORCEINLINE AETString( const wchar_t *lpStr );
	AE_FORCEINLINE AETString( AETString<char> );
	AE_FORCEINLINE AETString( AEUINT32 uiCapacity );
	AE_FORCEINLINE AETString( AETString &copy );
	AE_FORCEINLINE ~AETString( void );

	///////////////////////////////////////////////////////////////
	/// @}
	/// @name Modifica
	/// @{
	///////////////////////////////////////////////////////////////

	AE_FORCEINLINE AETString &ToUpper( void );
	AE_FORCEINLINE AETString &ToLower( void );

	AE_FORCEINLINE AETString &Trim( void );
	AE_FORCEINLINE AETString &LTrim( void );
	AE_FORCEINLINE AETString &RTrim( void );

	AE_FORCEINLINE void Clear( void );



	AE_FORCEINLINE AEUINT32 GetLength( void ) const;
	AE_FORCEINLINE bool IsEmpty( void ) const;
	AE_FORCEINLINE void SetCapacity( AEUINT32 uiCapacity );

	///////////////////////////////////////////////////////////////
	/// @}
	/// @name Accesso
	/// @{
	///////////////////////////////////////////////////////////////

	AEINT32 LastIndexOf( AETString &refStr ) const;
	AEINT32 LastIndexOf( wchar_t *lpStr ) const;

	AEINT32 IndexOf( AETString &refStr ) const;
	AEINT32 IndexOf( wchar_t *lpStr ) const;
	AEINT32 IndexOf( wchar_t cCharacter ) const;

	///////////////////////////////////////////////////////////////
	/// @}
	/// @name Operatori
	/// @{
	///////////////////////////////////////////////////////////////
	AETString &operator=( const wchar_t *lpStr );
	AETString &operator=( const AETString &refStr );
	AETString &operator=( const AETString<char> &refStr );

};

#include "AETStringWChar.inl"

#endif // _AETSTRINGCHAR_H_
